/*
 * ICouponModel.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.bean.Coupon;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;

import java.util.List;

/**
 * 红包与优惠的Model
 */
public interface ICouponModel {

    interface OnAccessNetListener {

        void onSuccess(
                List<DisplayListItem> displayListItems, boolean emptyResult, boolean hasMore, String totalItem);

        void onFailed();
    }

    interface OnExchangeOfflineRedPacketListener {

        void onSuccess(String message);

        void onFailed(String message);

        void onFinal();
    }

    interface OnCartUsefulCouponListener {

        void onSuccess(List<Coupon> source, List<DisplayListItem> displayListItems, Coupon selected);

        void onFailed();
    }

    void loadValidRedPaperList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void loadDeprecatedRedPaperList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void loadUsedRedPaperList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void loadValidCouponList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void loadUsedCouponList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void loadDeprecatedCouponList(boolean isRefreshing, String tag, OnAccessNetListener listener);

    void exchangedOfflineRedPacket(String redPacketCode, String tag, OnExchangeOfflineRedPacketListener listener);

    void postRefreshRedPacketEvent();

    void getCartRedPacketList(String pagerTag, OnCartUsefulCouponListener listener);

    void getCartCouponList(String pagerTag, OnCartUsefulCouponListener listener);

    void chooseRedPacket(String tag, String redPacketId, OnAccessNetListener listener);

    void chooseCoupon(String tag, String couponId, OnAccessNetListener listener);

}
